package day03.note;

import java.util.Random;
import java.util.Scanner;

public class txt6 {
    public static void main(String[] args) {
        Random r=new Random();
        int num=r.nextInt(50);
        System.out.println(num);

        Scanner s=new Scanner(System.in);

        int answer=s.nextInt();

        while (answer!=num){
            System.out.println(answer>num?"猜大了":"猜小了");
            answer=s.nextInt();
        }
        System.out.println("猜对了");






    }
}
